package com.example.ResumeWorkPlatform.service;

import java.util.List;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;
import com.example.ResumeWorkPlatform.dao.BasicUserDao;
import com.example.ResumeWorkPlatform.dao.BasicUserEntity;
import com.example.ResumeWorkPlatform.util.MyException;


/**
 * @ClassName: UserService
 * @Description: 用户-Service层
 * @Copyright: smartlab411
 * @Author chengwenixng
 * @DateTime  2021-03-20 
 */
@Service
public class UserService {

	private static final Logger log = LoggerFactory.getLogger(UserService.class);

	@Autowired
	BasicUserDao basicUserDao;
	
	/**
	 * 根据id和是否删除查询数据
	 */
	public BasicUserEntity  getBasicUserEntity(Long id,Boolean deLFlag) {
		return basicUserDao.findByIdAndDelFlag(id, true);
	}
	/**
	 * 根据id工业园区查询今日健康人员信息
	 */
	public List<BasicUserEntity>  basicUserEntities3(Long id) {
		return basicUserDao.findByIdAndisHealth(id);
	
	}
	/**
	 * 根据id工业园区查询今日健康并打卡人员信息
	 */
	public List<BasicUserEntity>  basicUserEntities4(Long id) {
		return basicUserDao.findByIdAndisHealthAndIsWork(id);
	
	}
	/**
	 * 根据id工业园区查询隔离人员信息
	 */
	public List<BasicUserEntity>  basicUserEntities5(Long id) {
		return basicUserDao.findByIdAndFinishInsulate(id);
	
	}
	/**
	 * 根据id工业园区查询隔离中人员信息
	 */
	public List<BasicUserEntity>  basicUserEntities6(Long id) {
		return basicUserDao.findByIdAndIsFinishInsulate(id);
	
	}
	/**
	 * 根据id工业园区查询已复工
	 */
	public List<BasicUserEntity>  basicUserEntities7(Long id) {
		return basicUserDao.findByIdAndworkResumption(id);
	
	}
	/**
	 * 根据id工业园区查询有疫区接触史
	 */
	public List<BasicUserEntity>  basicUserEntities8(Long id) {
		return basicUserDao.findByIdAndTouch(id);
	
	}
	/**
	 * 根据id工业园区查询回工作地
	 */
	public List<BasicUserEntity>  basicUserEntities9(Long id) {
		return basicUserDao.findByIdAndRturnWorkingLocation(id);
	
	}	
}

